import {Component} from '@angular/core';
import {NavController, Platform} from 'ionic-angular';
import {Helper} from "../../common/Helper";
import {ProductProvider} from "../../providers/product/product";

@Component({
  selector: 'page-product',
  templateUrl: 'product.html',
})
export class ProductPage {

  productList: any;

  constructor(public platform: Platform,
              public productProvider: ProductProvider,
              public navCtrl: NavController) {

  }

  getProductList(){
    this.productProvider.getList().then((data)=>{
      this.productList = data.content
    })
  }

  ionViewWillEnter(){
    Helper.setStatusBarDefault()
    this.getProductList()
  }

}
